package operation;

import book.Book;
import book.BookList;

public class Exit implements Ioperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("退出");


        System.exit(0);

        //或者
        int currentSize = bookList.getUsedSize();

        for (int i = 0; i < currentSize; i++) {
            bookList.setBook(i,null);
        }
        bookList.setUsedSize(0);
    }
}
